package org.generic.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.generic.interfaces.entity.User;
import org.generic.service.RoleService;
import org.generic.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * AbstractUserService
 *
 * @author 李坤
 */
public abstract class AbstractUserService<T extends User, M extends BaseMapper<T>, R extends RoleService> implements UserService<T> {
    @Autowired(required = false)
    protected M mapper;
    @Autowired(required = false)
    protected R roleService;

    @Override
    public T getUser(String id) {
        System.out.println(roleService.getRole(id));
        return this.mapper.selectById(id);
    }
}
